import React, { memo } from 'react'
import {discoverMenu} from 'common/local-data.js'
import {DiscoverWrap} from './style'
import {NavLink} from 'react-router-dom'
import {renderRoutes} from 'react-router-config'
export default memo(function HNDiscover(props) {
    const {route} = props;
    return (
        <DiscoverWrap>
            <div className="top-list ">

                <div className="top-menu wrap-v1">
                {
                    discoverMenu.map((item, index) => {
                        return(
                            <li key={item.title} className="item">
                                <NavLink to={item.link}>
                                    <em>
                                        {item.title}
                                    </em>
                                </NavLink>
                            </li>
                        )
                    })
                }
                </div>
            </div>
            {renderRoutes(route.routes)}
        </DiscoverWrap>

    )
})
